package cn.ijero.pictureselector.loader.image;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.MediaMetadataRetriever;
import android.util.Log;
import android.util.LruCache;
import android.widget.ImageView;

import androidx.annotation.DrawableRes;

import java.util.HashMap;

import cn.ijero.pictureselector.executor.ExecutorManager;
import cn.ijero.pictureselector.util.MimeTypeUtil;

public class ImageLoader {
    private static final String TAG = "ImageLoader";

    private static ImageLoader imageLoader;

    private ImageLoader() {
    }

    public static ImageLoader get() {
        if (imageLoader == null) {
            synchronized (ImageLoader.class) {
                if (imageLoader == null) {
                    imageLoader = new ImageLoader();
                }
            }
        }
        return imageLoader;
    }


    /**
     * 配置加载资源
     *
     * @param filePath 本地文件路径
     * @param mimeType 文件类型
     * @return
     */
    public ImageLoaderBuilder load(String filePath, String mimeType) {
        return new ImageLoaderBuilder().setFilePath(filePath).setMimeType(mimeType);
    }

}
